

<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>航空公司客户价值分析 - cxp&#39;s blog</title>
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  <meta name="google" content="notranslate" />

  
  
  <meta name="description" content=" 一、挖掘目标
通过分析航空公司用户数据，对客户进行分..."> 
  
  <meta name="author" content="Alex"> 

  
    <link rel="icon" href="/images/icons/favicon-16x16.png" type="image/png" sizes="16x16">
  
  
    <link rel="icon" href="/images/icons/favicon-32x32.png" type="image/png" sizes="32x32">
  
  
    <link rel="apple-touch-icon" href="/images/icons/apple-touch-icon.png" sizes="180x180">
  
  
    <meta rel="mask-icon" href="/images/icons/stun-logo.svg" color="#333333">
  
  
    <meta rel="msapplication-TileImage" content="/images/icons/favicon-144x144.png">
    <meta rel="msapplication-TileColor" content="#000000">
  

  <link rel="stylesheet" href="/css/style.css">

  
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1445822_h1619vhl1nr.css">
  

  
  
  <link rel="stylesheet" href="https://cdn.bootcss.com/fancybox/3.5.7/jquery.fancybox.min.css">
  

  
  
  <link rel="stylesheet" href="https://cdn.bootcss.com/highlight.js/9.18.1/styles/xcode.min.css">
  

  <script>
    var CONFIG = window.CONFIG || {};
    var ZHAOO = window.ZHAOO || {};
    CONFIG = {
      isHome: false,
      fancybox: true,
      pjax: false,
      lazyload: {
        enable: true,
        loadingImage: '',
      },
      donate: {
        enable: true,
        alipay: 'https://pic.izhaoo.com/alipay.jpg',
        wechat: 'https://pic.izhaoo.com/wechat.jpg'
      },
      motto: {
        api: '',
        default: '我在开了灯的床头下，想问问自己的心啊。'
      },
      galleries: {
        enable: true
      },
      fab: {
        enable: true,
        alwaysShow: false
      },
      carrier: {
        enable: true
      },
      daovoice: {
        enable: true
      }
    }
  </script>

  

  
<link rel="alternate" href="/atom.xml" title="cxp's blog" type="application/atom+xml">
</head>
<body class="lock-screen">
  <div class="loading"></div>
  


<nav class="navbar">
  <div class="left"></div>
  <div class="center">航空公司客户价值分析</div>
  <div class="right">
    <i class="iconfont iconmenu j-navbar-menu"></i>
  </div>
</nav>

  <nav class="menu">
  <div class="menu-wrap">
    <div class="menu-close">
      <i class="iconfont iconbaseline-close-px"></i>
    </div>
    <ul class="menu-content">
      
      
      
      
      <li class="menu-item"><a href="/ " class="underline"> 首页</a></li>
      
      
      
      
      <li class="menu-item"><a href="/galleries " class="underline"> 摄影</a></li>
      
      
      
      
      <li class="menu-item"><a href="/archives " class="underline"> 归档</a></li>
      
      
      
      
      <li class="menu-item"><a href="/tags " class="underline"> 标签</a></li>
      
      
      
      
      <li class="menu-item"><a href="/categories " class="underline"> 分类</a></li>
      
      
      
      
      <li class="menu-item"><a href="/about " class="underline"> 关于</a></li>
      
    </ul>
    <div class="menu-copyright"><p>Powered by <a target="_blank" href="https://hexo.io">Hexo</a>  |  Theme - <a target="_blank" href="https://github.com/izhaoo/hexo-theme-zhaoo">zhaoo</a></p></div>
  </div>
</nav>
  <main id="main">
  <div class="container" id="container">
    <article class="article">
  <div class="wrap">
    <section class="head">
  <img   class="lazyload" data-original="/images/theme/post-image.jpg" src=""  draggable="false">
  <div class="head-mask">
    <h1 class="head-title">航空公司客户价值分析</h1>
    <div class="head-info">
      <span class="post-info-item"><i class="iconfont iconcalendar"></i>三月 15, 2019</span
        class="post-info-item">
      
      <span class="post-info-item"><i class="iconfont iconfont-size"></i>4002</span>
    </div>
  </div>
</section>
    <section class="main">
      <section class="content">
        <h1 id="一-挖掘目标"><a class="markdownIt-Anchor" href="#一-挖掘目标"></a> 一、挖掘目标</h1>
<p>通过分析航空公司用户数据，对客户进行分类，对不同类别的客户进行特征分析，比较不同客户的客户价值，针对不同客户价值的客户采取不同的营销手段，制定相应的营销手段。</p>
<p>数据的属性主要有：客户的基本信息、乘机信息、积分信息。下面就开始介绍一下详细数据挖掘流程。</p>
<h1 id="二-数据挖掘过程"><a class="markdownIt-Anchor" href="#二-数据挖掘过程"></a> 二、数据挖掘过程：</h1>
<p>首先考虑我们的目标是为了进行客户价值分类，通常采用的分析模型是RFM模型，也就是消费时间间隔、消费频率、消费金额的指标。但是对于航空行业来说，通过分析可以得知对于长距离低价位和短距离高价位的票价总额相等的客户来说显然M一样但是价值相差很大。这时候选择一定时间累计的飞行里程数和平均折扣系数的平均值代替票价金额作为分析指标，同时针对航空公司有会员制度因此加入客户关系长度作为指标之一，建立起<strong>LRFMC</strong>模型。</p>
<table>
<thead>
<tr>
<th style="text-align:center">模型</th>
<th style="text-align:center"><center>L</th>
<th style="text-align:center"><center>R</th>
<th style="text-align:left"><center>F</th>
<th style="text-align:center"><center>M</th>
<th style="text-align:center"><center>C</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">航空公司LRFMC模型</td>
<td style="text-align:center">会员入会时间距离观测窗口结束月数</td>
<td style="text-align:center">客户最近一次飞机乘坐距离观测窗口结束的月数</td>
<td style="text-align:left">客户观测窗口内乘坐的飞机次数</td>
<td style="text-align:center">客户在观测窗口中的飞行里程</td>
<td style="text-align:center">客户在观测窗口的乘坐舱位对应的折扣系数的平均值</td>
</tr>
</tbody>
</table>
<p>按照我们以上的RFM模型来分析的话，建立分箱图，可以很直观的显示不同客户群体，但是细分类别过多，增加的营销难度和成本。因此采取聚类的方法分析客户价值：<strong>K-means</strong></p>
<h2 id="1数据抽取"><a class="markdownIt-Anchor" href="#1数据抽取"></a> 1.数据抽取</h2>
<blockquote>
<p>选取观测窗口，包括起始日期和时间间隔。</p>
</blockquote>
<p><strong>观测窗口内的数据为历史数据，观测结束日期到最新时间点的数据为增量数据。</strong></p>
<h2 id="2数据探索explore"><a class="markdownIt-Anchor" href="#2数据探索explore"></a> 2.数据探索（explore）</h2>
<p>数据探索是对异常值和缺失值进行分析，分析出数据的规律和异常值。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#-*- coding: utf-8 -*-</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">2</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#对数据进行基本的探索</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">3</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#返回缺失值个数以及最大最小值</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">4</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">5</span></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span></pre></td></tr><tr><td class="gutter"><pre><span class="line">6</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">7</span></pre></td><td class="code"><pre><span class="line">datafile= <span class="string">'E:\Test_learning\data\chapter7\demo\data/air_data.csv'</span> <span class="comment">#航空原始数据,第一行为属性标签</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">8</span></pre></td><td class="code"><pre><span class="line">resultfile = <span class="string">'E:\Test_learning\data\chapter7\demo\data/explore.xls'</span> <span class="comment">#数据探索结果表</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">9</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">10</span></pre></td><td class="code"><pre><span class="line">data = pd.read_csv(datafile, encoding = <span class="string">'utf-8'</span>) <span class="comment">#读取原始数据，指定UTF-8编码（需要用文本编辑器将数据装换为UTF-8编码）</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">11</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">12</span></pre></td><td class="code"><pre><span class="line">explore = data.describe(percentiles = [], include = <span class="string">'all'</span>).T <span class="comment">#包括对数据的基本描述，percentiles参数是指定计算多少的分位数表（如1/4分位数、中位数等）；T是转置，转置后更方便查阅</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">13</span></pre></td><td class="code"><pre><span class="line">explore[<span class="string">'null'</span>] = len(data)-explore[<span class="string">'count'</span>] <span class="comment">#describe()函数自动计算非空值数，需要手动计算空值数</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">14</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">15</span></pre></td><td class="code"><pre><span class="line">explore = explore[[<span class="string">'null'</span>, <span class="string">'max'</span>, <span class="string">'min'</span>]]</span></pre></td></tr><tr><td class="gutter"><pre><span class="line">16</span></pre></td><td class="code"><pre><span class="line">explore.columns = [<span class="string">u'空值数'</span>, <span class="string">u'最大值'</span>, <span class="string">u'最小值'</span>] <span class="comment">#表头重命名</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">17</span></pre></td><td class="code"><pre><span class="line"><span class="string">'''这里只选取部分探索结果。describe()函数自动计算的字段有count（非空值数）、unique（唯一值数）、top（频数最高者）、freq（最高频数）、mean（平均值）、std（方差）、min（最小值）、50%（中位数）、max（最大值）'''</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">18</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">19</span></pre></td><td class="code"><pre><span class="line">explore.to_excel(resultfile) <span class="comment">#导出结果</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">20</span></pre></td><td class="code"><pre><span class="line">print(<span class="string">"over"</span>)</span></pre></td></tr></table></figure>
<p><strong>经过数据探索得到了数据的空值数和最大最小值，并保存结果</strong></p>
<h2 id="3数据预处理"><a class="markdownIt-Anchor" href="#3数据预处理"></a> 3.数据预处理</h2>
<blockquote>
<p>数据预处理包括数据清洗、属性规约、数据变换</p>
</blockquote>
<p>在pandas中数据清洗的处理方式是一次性把满足清洗条件的一行数据全部丢弃。<br />
在案例中清洗的是票价为空和（票价为0，折扣不为0，总飞行里程数大于0的记录） 。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#-*- coding: utf-8 -*-</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">2</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#数据清洗，过滤掉不符合规则的数据</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">3</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">4</span></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span></pre></td></tr><tr><td class="gutter"><pre><span class="line">5</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">6</span></pre></td><td class="code"><pre><span class="line">datafile= <span class="string">'../data/air_data.csv'</span> <span class="comment">#航空原始数据,第一行为属性标签</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">7</span></pre></td><td class="code"><pre><span class="line">cleanedfile = <span class="string">'../tmp/data_cleaned.csv'</span> <span class="comment">#数据清洗后保存的文件</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">8</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">9</span></pre></td><td class="code"><pre><span class="line">data = pd.read_csv(datafile,encoding=<span class="string">'utf-8'</span>) <span class="comment">#读取原始数据，指定UTF-8编码（需要用文本编辑器将数据装换为UTF-8编码）</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">10</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">11</span></pre></td><td class="code"><pre><span class="line">data = data[data[<span class="string">'SUM_YR_1'</span>].notnull()*data[<span class="string">'SUM_YR_2'</span>].notnull()] <span class="comment">#票价非空值才保留</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">12</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">13</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#只保留票价非零的，或者平均折扣率与总飞行公里数同时为0的记录。</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">14</span></pre></td><td class="code"><pre><span class="line">index1 = data[<span class="string">'SUM_YR_1'</span>] != <span class="number">0</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">15</span></pre></td><td class="code"><pre><span class="line">index2 = data[<span class="string">'SUM_YR_2'</span>] != <span class="number">0</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">16</span></pre></td><td class="code"><pre><span class="line">index3 = (data[<span class="string">'SEG_KM_SUM'</span>] == <span class="number">0</span>) &amp; (data[<span class="string">'avg_discount'</span>] == <span class="number">0</span>) <span class="comment">#该规则是“与”</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">17</span></pre></td><td class="code"><pre><span class="line">data = data[index1 | index2 | index3] <span class="comment">#该规则是“或”</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">18</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">19</span></pre></td><td class="code"><pre><span class="line">data.to_excel(cleanedfile) <span class="comment">#导出结果</span></span></pre></td></tr></table></figure>
<p>第二步数据清洗完之后进行属性规约，选择与模型分析相关的属性，去掉一些不相关、弱相关、和冗余的属性。<br />
第三步是进行数据变换。将数据进行转换，达到适合模型使用的要求。包括属性的构造和数据标准化<br />
根据已有属性分别计算L、R、F、M、C，然后进行数据标准化：</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#-*- coding: utf-8 -*-</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">2</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#标准差标准化</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">3</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">4</span></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span></pre></td></tr><tr><td class="gutter"><pre><span class="line">5</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">6</span></pre></td><td class="code"><pre><span class="line">datafile = <span class="string">'../data/zscoredata.xls'</span> <span class="comment">#需要进行标准化的数据文件；</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">7</span></pre></td><td class="code"><pre><span class="line">zscoredfile = <span class="string">'../tmp/zscoreddata.xls'</span> <span class="comment">#标准差化后的数据存储路径文件；</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">8</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">9</span></pre></td><td class="code"><pre><span class="line"><span class="comment">#标准化处理</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">10</span></pre></td><td class="code"><pre><span class="line">data = pd.read_excel(datafile)</span></pre></td></tr><tr><td class="gutter"><pre><span class="line">11</span></pre></td><td class="code"><pre><span class="line">data = (data - data.mean(axis = <span class="number">0</span>))/(data.std(axis = <span class="number">0</span>)) <span class="comment">#简洁的语句实现了标准化变换，类似地可以实现任何想要的变换。</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">12</span></pre></td><td class="code"><pre><span class="line">data.columns=[<span class="string">'Z'</span>+i <span class="keyword">for</span> i <span class="keyword">in</span> data.columns] <span class="comment">#表头重命名。</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">13</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">14</span></pre></td><td class="code"><pre><span class="line">data.to_excel(zscoredfile, index = <span class="literal">False</span>) <span class="comment">#数据写入</span></span></pre></td></tr></table></figure>
<p>上面已经通过数据探索和数据与处理处理完数据，下面就是模型构建和训练的过程了。</p>
<h2 id="4模型构建"><a class="markdownIt-Anchor" href="#4模型构建"></a> 4.模型构建</h2>
<h3 id="41客户聚类"><a class="markdownIt-Anchor" href="#41客户聚类"></a> 4.1客户聚类</h3>
<p><strong>结合业务的理解和分析来确定客户的类别数</strong></p>
<blockquote>
<p>使用算法为：K-means算法<br />
调用库为：Scikit-Learn下的聚类子库(sklearn.cluster)</p>
</blockquote>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span></pre></td><td class="code"><pre><span class="line">   <span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span></pre></td></tr><tr><td class="gutter"><pre><span class="line">2</span></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> sklearn.cluster <span class="keyword">import</span> KMeans <span class="comment">#导入kmeans算法</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">3</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">4</span></pre></td><td class="code"><pre><span class="line">datafile = <span class="string">''</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">5</span></pre></td><td class="code"><pre><span class="line">data = pd.read_excel(datafile)</span></pre></td></tr><tr><td class="gutter"><pre><span class="line">6</span></pre></td><td class="code"><pre><span class="line"></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">7</span></pre></td><td class="code"><pre><span class="line">kmodel = KMeans(n_cluster = k, n_jobs = <span class="number">4</span>)<span class="comment">#n_jobs是并行数，一般设置为CPU的个数</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">8</span></pre></td><td class="code"><pre><span class="line">kmodel.fit(data)<span class="comment">#训练模型</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">9</span></pre></td><td class="code"><pre><span class="line">kmodel.cluster_center_<span class="comment">#查看聚类中心</span></span></pre></td></tr><tr><td class="gutter"><pre><span class="line">10</span></pre></td><td class="code"><pre><span class="line">kmodel.labels_  <span class="comment">#查看个样本对应的类别</span></span></pre></td></tr></table></figure>
<h3 id="42客户价值分析rank"><a class="markdownIt-Anchor" href="#42客户价值分析rank"></a> 4.2客户价值分析（Rank）</h3>
<p>上面根据模型训练可以得到聚类中心和样本类别，下面对聚类结果进行客户价值的分析。<br />
L：客户关系时间长度、R：上次乘坐航班距离观测窗口至结束的时间间隔、F：观测窗口内乘坐航班次数、M：观测窗口内的总的飞行里程、C、舱位票价平均折扣系数。通过对每个客户群体进行分析着五个指标可以将客户分为：</p>
<ul>
<li>重要保持客户：属于航空公司客户生命周期的稳定期。这类人对公司的贡献最大，也是对理想的客户类型，应该针对这类客户进行差异化管理，提高这类用户的满意度和忠诚度，尽可能延长这类客户的高消费。</li>
<li>重要发展客户：属于航空公司客户生命周期的发展期。这类人在当前贡献值可能不是很高，但是具有发展潜力。航空公司应该努力促使这类人增加在本公司的乘机消费和合作伙伴处的消费，增加他们转向竞争对手的转移成本。</li>
<li>重要挽留客户：属于航空公司客户生命周期管理的衰退期，航空公司应关注这类客户的消费时间和消费次数的变化，要掌握最新的客户信息。对其重点联系，及时营销。</li>
<li>一般客户与低价值客户：这种类型的客户对于航空公司的贡献比较低</li>
</ul>
<p><strong>对于上面的分类进行客户群体rank，可以得到上诉5类客户群体的优先级别。对于新增的客户信息，考虑业务的实际情况，建议每个月运行模型，对新增客户进行特征分析，适时调整营销策略。最后主要要随着观测窗口的变动进行模型的更新。一般是根据经验进行模型重新训练。</strong></p>
<h3 id="43模型应用"><a class="markdownIt-Anchor" href="#43模型应用"></a> 4.3模型应用</h3>
<p>对各个客户群进行特征分析，制定的营销手段如下：</p>
<ul>
<li>会员升级与保级：会员等级制度，做的工作是在时间节点进行提醒，或者提供会员促销活动，提高人们的消费欲望和满意度。</li>
<li>交叉销售：跟非航空公司企业合作，会员可以在合作企业消费获得本公司积分，增强与公司的联系。</li>
<li>首次兑换：达到一定的里程数可以兑换免费票或者折扣票，做到deadline提醒，或者提供优惠服务。</li>
</ul>
<h1 id="三-总结"><a class="markdownIt-Anchor" href="#三-总结"></a> 三、总结</h1>
<p>业务上来说客户的识别期和发展期很重要，但是最重要还是在稳定期要有一批优质的稳定客户。因此在进行业务分析时，应该将优先资源投入到这批客户中，做到一对一定制服务。</p>

      </section>
      <section class="extra">
        
        <ul class="copyright">
  
  <li><strong>本文作者：</strong>Alex</li>
  <li><strong>本文链接：</strong><a href="https://cxpeng.cn/archives/e5d37995.html">https://cxpeng.cn/archives/e5d37995.html</a></li>
  <li><strong>版权声明：</strong>本博客所有文章均采用<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh"
      rel="external nofollow" target="_blank"> BY-NC-SA </a>许可协议，转载请注明出处！</li>
  
</ul>
        
        
        <section class="donate">
  <div class="qrcode">
    <img   class="lazyload" data-original="https://pic.izhaoo.com/alipay.jpg" src="" >
  </div>
  <div class="icon">
    <a href="javascript:;" target="_blank" rel="noopener" id="alipay"><i class="iconfont iconalipay"></i></a>
    <a href="javascript:;" target="_blank" rel="noopener" id="wechat"><i class="iconfont iconwechat-fill"></i></a>
  </div>
</section>
        
        
  <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/K-Means/" rel="tag">K_Means</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Python/" rel="tag">Python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/" rel="tag">数据分析</a></li></ul>

        
<nav class="nav">
  
    <a href="/archives/8409c1ac.html"><i class="iconfont iconleft"></i>PYTHON编程：从入门到实践（学习笔记）</a>
  
  
    <a href="/archives/ee940876.html">博客搭建记录<i class="iconfont iconright"></i></a>
  
</nav>

      </section>
      
      <section class="comments">
  
  <div class="btn" id="comments-btn">查看评论</div>
  
  
</section>
      
    </section>
  </div>
</article>
  </div>
</main>
  <footer class="footer">
  <div class="footer-social">
    
    
    
    
    
    <a href="tencent://message/?Menu=yes&uin=894519210 " target="_blank" onMouseOver="this.style.color= '#12B7F5'"
      onMouseOut="this.style.color='#33333D'">
      <i class="iconfont footer-social-item  iconQQ "></i>
    </a>
    
    
    
    
    
    <a href="javascript:; " target="_blank" onMouseOver="this.style.color= '#09BB07'"
      onMouseOut="this.style.color='#33333D'">
      <i class="iconfont footer-social-item  iconwechat-fill "></i>
    </a>
    
    
    
    
    
    <a href="https://www.instagram.com/izhaoo/ " target="_blank" onMouseOver="this.style.color= '#DA2E76'"
      onMouseOut="this.style.color='#33333D'">
      <i class="iconfont footer-social-item  iconinstagram "></i>
    </a>
    
    
    
    
    
    <a href="https://github.com/izhaoo " target="_blank" onMouseOver="this.style.color= '#24292E'"
      onMouseOut="this.style.color='#33333D'">
      <i class="iconfont footer-social-item  icongithub-fill "></i>
    </a>
    
    
    
    
    
    <a href="mailto:izhaoo@163.com " target="_blank" onMouseOver="this.style.color='#FFBE5B'"
      onMouseOut="this.style.color='#33333D'">
      <i class="iconfont footer-social-item  iconmail"></i>
    </a>
    
  </div>
  <div class="footer-copyright"><p>Powered by <a target="_blank" href="https://hexo.io">Hexo</a>  |  Theme - <a target="_blank" href="https://github.com/izhaoo/hexo-theme-zhaoo">zhaoo</a></p></div>
</footer>
  
      <div class="fab fab-plus">
    <i class="iconfont iconplus"></i>
  </div>
  
  <div class="fab fab-daovoice">
    <i class="iconfont iconcomment"></i>
  </div>
  
  <div class="fab fab-up">
    <i class="iconfont iconcaret-up"></i>
  </div>
  
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ["$","$"], ["\\(","\\)"] ],
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
            processEscapes: true
        }
    });
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax();
        for (var i = 0; i < all.length; ++i)
            all[i].SourceElement().parentNode.className += ' has-jax';
    });
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script>
</body>

<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>




<script src="https://cdn.bootcdn.net/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js"></script>




<script src="https://cdn.bootcss.com/fancybox/3.5.7/jquery.fancybox.min.js"></script>




<script src="/js/utils.js"></script>
<script src="/js/modules.js"></script>
<script src="/js/zui.js"></script>
<script src="/js/script.js"></script>




<script>
  (function (i, s, o, g, r, a, m) {
    i["DaoVoiceObject"] = r;
    i[r] = i[r] || function () {
      (i[r].q = i[r].q || []).push(arguments)
    }, i[r].l = 1 * new Date();
    a = s.createElement(o), m = s.getElementsByTagName(o)[0];
    a.async = 1;
    a.src = g;
    a.charset = "utf-8";
    m.parentNode.insertBefore(a, m)
  })(window, document, "script", ('https:' == document.location.protocol ? 'https:' : 'http:') +
    "//widget.daovoice.io/widget/0f81ff2f.js", "daovoice")
  daovoice('init', {
    app_id: "abcdefg"
  }, {
    launcher: {
      disableLauncherIcon: true,
    },
  });
  daovoice('update');
</script>



<script>
  (function () {
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
      bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    } else {
      bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
  })();
</script>


<script>
  var _hmt = _hmt || [];
  (function () {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?4c204d8bc027a0455b5fc642ac334ca8";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
  })();
</script>










</html>